import api from '@/common/api.js';
// 购买


const Order = async (data, success, fail, isShowLoading = true) => {
  return await api.Request({
    url: '/api/services/app/TenPay3/Order',
    data: data,
    isObj: true,
    isShowLoading: isShowLoading,
    abpSuccess: success,
    abpFail: fail
  });
}; // 购买失败


const OrderFail = async (data, success, fail, isShowLoading = true) => {
return await  api.Request({
    url: '/api/services/app/TenPay3/OrderFail',
    data: data,
    isObj: true,
    isShowLoading: isShowLoading,
    abpSuccess: success,
    abpFail: fail
  });
}; // 支付状态查询


const OrderQuery = async (data, success, fail, isShowLoading = false) => {
 return await api.Request({
    url: '/api/services/app/TenPay3/OrderQuery',
    data: data,
    isObj: true,
    isShowLoading: isShowLoading,
    abpSuccess: success,
    abpFail: fail
  });
};

export default {
  Order: Order,
  OrderFail: OrderFail,
  OrderQuery: OrderQuery
};